 //
//  Line.m
//  Project
//
//  Created by Nguyen Tan Loc on 8/10/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "Line.h"

@implementation Line

-(id) init
{
    if (self = [super initWithSpriteFrameName:[self getSpriteFrameName]])
    {
        [self setAnchorPoint:ccp(0.5, 0.0)];
        [self.texture setAliasTexParameters];
        [self setOpacity:LINE_ALPHA];
    }
    
    return self;
}

-(void) setAngle:(float)angle
{
    [self setRotation:angle];
}

-(void) setLength:(float)length
{
    length /= self.contentSize.height;
    [self setScaleY:length];
}

-(NSString *) getSpriteFrameName
{
    return SFN_LINE;
}

@end
